//引入request
import request from '@/utils/request.js'


// 获取图形验证码
export const captcha = (params) => {
  return request({
    method: 'GET',
    url: 'oper/captcha',
    params: params
  })
}

// 获取邮箱验证码
export const authcode = (params) => {
  return request({
    method: 'GET',
    url: 'oper/authcode',
    params: params
  })
}

// 注册
export const register = (data) => {
  return request({
    method: 'POST',
    url: 'oper/register',
    data: data
  })
}

// 登录
export const login = (data) => {
  return request({
    method: 'POST',
    url: 'oper/login',
    data: data
  })
}

// 重置密码
export const reset = (data) => {
  return request({
    method: 'POST',
    url: 'oper/reset',
    data: data
  })
}

// 获取用户信息
export const info = () => {
  return request({
    method: 'POST',
    url: 'oper/info'
  })
}

// 更新用户信息
export const update = (data) => {
  return request({
    method: 'POST',
    url: 'oper/update',
    data: data
  })
}